var suits = ["Clubs", "Spades", "Hearts", "Diamonds"];
var ranks = ["2", "3", "4", "5", "6", "7", "8", "9", "T", "Jack", "Queen", "King", "Ace"];

function Card(suit, rank){
	if (((rank >= 0) && (rank < ranks.length)) && ((suit >= 0) && (suit < suits.length))) {
		this.rank = ranks[rank];
		this.suit = suits[suit];
	}
	else {
		this.rank = "";
		this.suit = "";
	}
	this.getCardName = getCardName;
	this.image = "./img/cards/"+this.rank[0]+this.suit[0]+".png";
}

function getCardName() {
	return (this.rank + " of " + this.suit);
}

